import unittest
import time
from Page import Page
from selenium.webdriver.common.by import By
from selenium import  webdriver

class TestCase(unittest.TestCase):
    def setUp(self):
        self.driver=webdriver.Edge()
        self.driver.maximize_window()

    def tearDown(self):
        time.sleep(15)
        self.driver.quit()
    #     登录

    def test_01(self):
        po=Page(self.driver)
        po.open_url('http://localhost:8080/login/')
        time.sleep(5)
        po.name_input()
        time.sleep(3)
        po.pwd_input()
        time.sleep(3)
        po.login()
        time.sleep(3)


    # 添加
    # def test_02(self):
    #     po = Page(self.driver)
    #     po.open_url('http://localhost:8080/about/')
    #     time.sleep(5)
    #     po.add()
    #     time.sleep(3)
    #     po.studen_input()
    #     time.sleep(3)
    #     po.operte()
    #     time.sleep(3)
    #     po.teacher()
    #     time.sleep(3)
    #     po.button()
    #     time.sleep(3)


    # #     修改
    # def test_03(self):
    #     po = Page(self.driver)
    #     po.open_url('http://localhost:8080/about/')
    #     time.sleep(5)
    #     po.xiugai()
    #     time.sleep(3)
    #     po.name01()
    #     time.sleep(3)
    #     po.age()
    #     time.sleep(3)
    #     po.six()
    #     time.sleep(3)
    #     po.classe()
    #     time.sleep(3)
    #     po.gx()

if __name__ == '__main__':
    unittest.main()